package com.example.interfaces.dto;

import java.math.BigDecimal;
import com.example.infrastructure.excel.ExcelExportable;
import com.example.infrastructure.excel.ExcelImportable;
import cn.idev.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.*;

/**
 * 处方药品明细表 DTO
 *
 * @author wangal
 * @since 2025-07-25
 */
@Data
@Schema(name = "PrescriptionDetailsDTO", description = "处方药品明细表DTO")
public class PrescriptionDetailsDTO implements ExcelExportable, ExcelImportable {

    @Schema(description = "处方ID")
    @ExcelProperty("处方ID")
    @NotNull(message = "处方ID不能为空")
    private Long prescriptionId;
    
    @Schema(description = "药品名称")
    @ExcelProperty("药品名称")
    @NotBlank(message = "药品名称不能为空")
    private String medicineName;
    
    @Schema(description = "药品编码")
    @ExcelProperty("药品编码")
    @NotBlank(message = "药品编码不能为空")
    private String medicineCode;
    
    @Schema(description = "规格")
    @ExcelProperty("规格")
    @NotBlank(message = "规格不能为空")
    private String specification;
    
    @Schema(description = "生产厂家")
    @ExcelProperty("生产厂家")
    @NotBlank(message = "生产厂家不能为空")
    private String manufacturer;
    
    @Schema(description = "用法")
    @ExcelProperty("用法")
    @NotBlank(message = "用法不能为空")
    private String usageMethod;
    
    @Schema(description = "用量")
    @ExcelProperty("用量")
    @NotBlank(message = "用量不能为空")
    private String dosage;
    
    @Schema(description = "频次")
    @ExcelProperty("频次")
    @NotBlank(message = "频次不能为空")
    private String frequency;
    
    @Schema(description = "疗程")
    @ExcelProperty("疗程")
    @NotBlank(message = "疗程不能为空")
    private String duration;
    
    @Schema(description = "数量")
    @ExcelProperty("数量")
    @NotNull(message = "数量不能为空")
    private Integer quantity;
    
    @Schema(description = "单位")
    @ExcelProperty("单位")
    @NotBlank(message = "单位不能为空")
    private String unit;
    
    @Schema(description = "单价")
    @ExcelProperty("单价")
    private BigDecimal unitPrice;
    
    @Schema(description = "小计")
    @ExcelProperty("小计")
    private BigDecimal totalPrice;
    
    @Schema(description = "租户编号")
    @ExcelProperty("租户编号")
    @NotNull(message = "租户编号不能为空")
    private Long tenantId;
    
}
